package edu.cycle;

/*空心三角形*/

import java.util.Scanner;

public class cycle0ks {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入三角形的高：");
        int h = scan.nextInt();
        for(int i=1;i<=h;i++)
        {
            for(int k=h;k>i;k--)
            {
                System.out.print(" ");
            }
            for(int j=1;j<=2*i-1;j++)
            {
                if (j==1||j==2*i-1||i==h) {
                    System.out.print("*");
                }else {
                    System.out.print(" ");
                }
            }
            System.out.println();
        }
    }
}